package com.vero.management.service.impl;

import java.util.List;
import com.vero.common.core.utils.DateUtils;
import com.vero.management.service.IVaccineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.vero.management.mapper.VaccineMapper;
import com.vero.system.api.domain.Vaccine;

/**
 * 疫苗信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-06
 */
@Service
public class VaccineServiceImpl implements IVaccineService
{
    @Autowired
    private VaccineMapper vaccineMapper;

    /**
     * 查询疫苗信息
     * 
     * @param vaccineId 疫苗信息主键
     * @return 疫苗信息
     */
    @Override
    public Vaccine selectVaccineByVaccineId(Long vaccineId)
    {
        return vaccineMapper.selectVaccineByVaccineId(vaccineId);
    }

    /**
     * 查询疫苗信息列表
     * 
     * @param vaccine 疫苗信息
     * @return 疫苗信息
     */
    @Override
    public List<Vaccine> selectVaccineList(Vaccine vaccine)
    {
        return vaccineMapper.selectVaccineList(vaccine);
    }

    /**
     * 新增疫苗信息
     * 
     * @param vaccine 疫苗信息
     * @return 结果
     */
    @Override
    public int insertVaccine(Vaccine vaccine)
    {
        return vaccineMapper.insertVaccine(vaccine);
    }

    /**
     * 修改疫苗信息
     * 
     * @param vaccine 疫苗信息
     * @return 结果
     */
    @Override
    public int updateVaccine(Vaccine vaccine)
    {
        vaccine.setUpdateTime(DateUtils.getNowDate());
        return vaccineMapper.updateVaccine(vaccine);
    }

    /**
     * 批量删除疫苗信息
     * 
     * @param vaccineIds 需要删除的疫苗信息主键
     * @return 结果
     */
    @Override
    public int deleteVaccineByVaccineIds(Long[] vaccineIds)
    {
        return vaccineMapper.deleteVaccineByVaccineIds(vaccineIds);
    }

    /**
     * 删除疫苗信息信息
     * 
     * @param vaccineId 疫苗信息主键
     * @return 结果
     */
    @Override
    public int deleteVaccineByVaccineId(Long vaccineId)
    {
        return vaccineMapper.deleteVaccineByVaccineId(vaccineId);
    }
}
